﻿<div ng-controller="StaffTimeTestController">
        

    <select  ng-model="myFilter.RowStatus">
        <option value="0">Unactive</option>
        <option value="1">Active</option>
        <option value="">All</option>                      
    </select>

    Order By

    <select ng-model="myOrderBy">
        <option value="true">Active</option>
        <option value="false">Unactive</option>                           
    </select>


    <table class="auto-style1" border="1">
        <tr>
            <td>Id</td>
            <td>StaffId</td>
            <td>StampDate</td>
            <td>UpdateTime</td>
            <td>Remark</td>
            <td>CheckIn</td>
            <td>CheckOut</td>
            <td>GoOut</td>
            <td>TurnBack</td>
            <td>StartBreakTime</td>
            <td>EndBreakTime</td>
            <td>RowStatus</td>
            <td>Edit</td>
        </tr>
        <tr ng-repeat="row in rowsData | filter : myFilter | orderBy : 'RowStatus' : myOrderBy" ng-click="getRowData(row)">
            <td>{{ row.Id }}</td>
            <td>{{ row.StaffId }}</td>
            <td>{{ row.StampDate }}</td>
            <td>{{ row.UpdateTime }}</td>
            <td>{{ row.Remark }}</td>
            <td>{{ row.CheckIn }}</td>
            <td>{{ row.CheckOut }}</td>
            <td>{{ row.GoOut }}</td>
            <td>{{ row.TurnBack }}</td>
            <td>{{ row.StartBreakTime }}</td>
            <td>{{ row.EndBreakTime }}</td>
            <td>{{ row.RowStatus }}</td>
            <td><input id="btn_edit" type="button" value="Edit" ng-click="edit(row.Id)"/></td>
        </tr>
    </table>
    <br />
    <table class="auto-style1">
        <tr>
            <td>StaffId</td>
            <td>
                <input id="StaffId" type="text" ng-model="StaffId" /></td>
        </tr>
        <tr>
            <td>StampDate</td>
            <td>
                <input id="StampDate" type="text" ng-model="StampDate" /></td>
        </tr>
        <tr>
            <td>UpdateTime</td>
            <td>
                <input id="UpdateTime" type="text" ng-model="UpdateTime" /></td>
        </tr>
        <tr>
            <td>Remark</td>
            <td>
                <input id="Remark" type="text" ng-model="Remark" /></td>
        </tr>
        <tr>
            <td>CheckIn</td>
            <td>
                <input id="CheckIn" type="text" ng-model="CheckIn" /></td>
        </tr>
        <tr>
            <td>CheckOut</td>
            <td>
                <input id="CheckOut" type="text" ng-model="CheckOut" /></td>
        </tr>
        <tr>
            <td>GoOut</td>
            <td>
                <input id="GoOut" type="text" ng-model="GoOut" /></td>
        </tr>
        <tr>
            <td>TurnBack</td>
            <td>
                <input id="TurnBack" type="text" ng-model="TurnBack" /></td>
        </tr>
        <tr>
            <td>StartBreakTime</td>
            <td>
                <input id="StartBreakTime" type="text" ng-model="StartBreakTime" /></td>
        </tr>
        <tr>
            <td>EndBreakTime</td>
            <td>
                <input id="EndBreakTime" type="text" ng-model="EndBreakTime" /></td>
        </tr>
        <tr>
            <td>RowStatus</td>
            <td>
                <input id="RowStatus" type="text" ng-model="RowStatus" /></td>
        </tr>
        <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
        </tr>
        <tr>
            <td><input id="btn_update" type="button" value="Update" ng-click="update()" /></td>
            <td>
                <input id="btn_save" type="button" value="Save" ng-click="save()" />
            </td>
        </tr>
    </table>
</div>